import { createApp } from 'vue'
import App from './App.vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import './style/index.scss'

import VueViewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

import { setupRouter } from './router'
import { setupStore } from '@/store'
import { BasicForm } from '@/components/BasicForm'

import './permission'
// 安装包
const setupPackage = () => {
  const app = createApp(App)

  app.use(ElementPlus, { locale: zhCn })

  app.use(VueViewer)

  app.component('BasicForm', BasicForm)

  setupRouter(app)

  setupStore(app)

  app.mount('#app')
}
setupPackage()
